import VueRouter from "vue-router";
import index from "../../components/index/index.vue";
import homepage from "../../components/index/homepage.vue";
import classification from "../../components/index/classification.vue";
import supermarket from "../../components/details/supermarket.vue";
import login from "../../components/management/login.vue";
import live from "../../components/details/live.vue";
import good from "../../components/details/good.vue";

export default new VueRouter({
    routes:[
        {
            path:'/homepage',
            component:index,
            children:[
                {
                    path:'/homepage',
                    component:homepage
                },
                {
                    path:'/classification',
                    component:classification
                }
            ],
            redirect:'/homepage'
        },
        {
            path:'/supermarket',
            component:supermarket
        },
        {
            path:'/login',
            component:login
        },
        {
            path:'/live',
            component:live
        },
        {
            path:'/good',
            component:good
        },
        {
            path:'/*',
            redirect:'/homepage'
        }
    ]
})